<template>
	<div class="grand-child">
		<h3>孙组件</h3>
		<h4>{{ a }}</h4>
		<h4>{{ b }}</h4>
		<h4>{{ c }}</h4>
		<h4>{{ d }}</h4>
		<h4>{{ x }}</h4>
		<h4>{{ y }}</h4>
		<button @click="sendT">更改爷组件的值</button>
	</div>
</template>
<!-- 安装 vue 路由模块  npm install vue-router -->

<!-- npm i vite-plugin-vue-setup-extend -D -->
<script setup lang="ts" name="GrandChild">
const emit = defineProps(["a", "b", "c", "d", "x", "y", "editD"])

//发送代码
function sendT() {
	emit.editD(600)
}
</script>

<style scoped>
.grand-child {
	margin-top: 20px;
	background-color: orange;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 0 10px black;
}
</style>